export const tableConfig = [
    { prop: "code", label: "角色编号", minWidth: "140" },
    { prop: "name", label: "角色名称", minWidth: "140" },
    { slotName: "state", label: "状态", minWidth: "140" },
    { prop: "createTime", label: "添加日期", minWidth: "140" },
    { label: "操作", minWidth: "200", slotName: "operate", fixed: "right" }
];
export const formConfig = [
    {
        formType: "input",
        type: "text",
        formName: "roleCode",
        labelName: "角色编号",
        placeholder: "请输入角色编号",
        style: {
            width: "100%"
        }
    },
    {
        formType: "input",
        type: "text",
        formName: "roleName",
        labelName: "角色名称",
        placeholder: "请输入角色名称",
        style: {
            width: "100%"
        }
    },
    {
        formType: "select",
        formName: "roleStatus",
        labelName: "角色状态",
        placeholder: "请选择角色状态",
        style: {
            width: "194px"
        },
        options: [
            { label: "启用", value: 0 },
            { label: "禁用", value: 1 }
        ]
    }
];
export const popupFormSetConfig = [
    {
        formType: "input",
        type: "text",
        formName: "code",
        labelName: "角色编号",
        maxlength: 15,
        placeholder: "请输入角色编号",
        style: {
            width: "100%"
        }
    },
    {
        formType: "input",
        type: "text",
        formName: "name",
        labelName: "角色名称",
        maxlength: 10,
        placeholder: "请输入角色名称",
        style: {
            width: "100%"
        }
    },
    {
        formType: "radio",
        formName: "isEnable",
        labelName: "角色状态",
        style: {
            width: "100%"
        },
        options: [
            { label: "启用", value: 0 },
            { label: "禁用", value: 1 }
        ]
    }
];
export const popupFormGetConfig = [
    { formType: "text", formName: "code", labelName: "角色编号" },
    { formType: "text", formName: "name", labelName: "角色姓名" },
    {
        formType: "radio",
        formName: "isEnable",
        labelName: "角色状态",
        style: {
            width: "100%"
        },
        disabled: true,
        options: [
            { label: "启用", value: 0 },
            { label: "禁用", value: 1 }
        ]
    }
];
export const popupRules = {
    code: [
        {
            validator: (rule, value, callback) => {
                if (!value) {
                    callback(new Error("请输入角色编号"));
                } else {
                    return true;
                }
            },
            trigger: "change"
        }
    ],
    name: [
        {
            validator: (rule, value, callback) => {
                if (!value) {
                    callback(new Error("请输入角色名称"));
                } else {
                    return true;
                }
            },
            trigger: "change"
        }
    ],
    state: [
        {
            validator: (rule, value, callback) => {
                if (value === "") {
                    callback(new Error("请选择角色状态"));
                } else {
                    return true;
                }
            },
            trigger: "change"
        }
    ]
};
